home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / AmigaOS / Aplus_Dev / AP-Website / forum / wbboard / admin / index.php < prev    next >
Encoding:
Text File  |  2002-10-28  |  840 b   |  26 lines

  1. <? 
  2. require "global.php"; 
  3. if($mode=="login") {
  4.     $userpassword = md5($userpassword);
  5.     $check = $db_zugriff->query_first("SELECT userid FROM bb".$n."_user_table WHERE username = '$username' AND userpassword = '$userpassword'");
  6.     if($check[0]) {
  7.     
  8.         $user_id = $check[0];
  9.         $user_password = $userpassword;
  10.         session_register("user_id");
  11.         session_register("user_password");
  12.         setcookie("user_id", "$user_id", time()+(3600*24*365));
  13.         setcookie("user_password", "$user_password", time()+(3600*24*365));
  14.     
  15.         header("LOCATION: index.php?action=1");
  16.         exit;
  17.     }
  18.     else $error = "Zugriff verweigert!";
  19. }
  20.  
  21. if(getUser_stat($user_id,$user_password)) eval("dooutput(\"".gettemplate("frameset")."\");");
  22. else {
  23.     eval ("\$headinclude = \"".gettemplate("headinclude")."\";");    
  24.     eval("dooutput(\"".gettemplate("login")."\");");
  25. }
  26. ?>